import request from '../utils/http-utils.js'
const userApi = {
	ByPage: '/admin/back/user/page',
	FreezeUser: '/admin/back/user'
}

/**
 * 分页查看用户列表
 * @param {Object} page
 */
export function getUserByPage (page) {
	return request({
		url: userApi.ByPage,
		method: 'post',
		data: page
	})
}

/**
 * 冻结用户
 * @param {Object} id
 * @param {Object} deleted
 */
export function freezeUser (id ,deleted) {
	return request({
		url: userApi.FreezeUser + `/${id}/freeze/${deleted}`,
		method: 'put'
	})
}
